package pl.edu.agh.uddiProxy.client;

import java.util.List;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public interface CurrencyService extends RemoteService {
	String SERVICE_URI = "/currencyService.rpc";
	
	public static final class Util {
		private Util() {
		}
		
		public static CurrencyServiceAsync getInstance() {
			CurrencyServiceAsync instance = (CurrencyServiceAsync) GWT.create(CurrencyService.class);
			ServiceDefTarget target = (ServiceDefTarget) instance;
			target.setServiceEntryPoint(GWT.getModuleBaseURL() + SERVICE_URI);
			return instance;
		}
	}
	
	List<Currency> getAllCurrency();
	Double convert(String tModelKey, String targetCurrency);
	Double convert(Double value, String sourceCurrency);
}
